import request from '@/utils/request'


//查询新增所需字段
export function queryFieldList(type) {
  return request({
    url: '/field/bizCrmField/list/'+type,
    method: 'post',
  })
}
//查询模块字段列表
export function queryListHead(type) {
  return request({
    url: '/field/bizCrmField/queryListHead/'+type,
    method: 'post',
  })
}
//查询详情
export function queryById(id) {
  return request({
    url: '/crm/bizCrmCustomer/queryById/'+id,
    method: 'post',
  })
}
//设置锁定字段
export function setIsLock(data) {
  return request({
    url: '/field/bizCrmField/setIsLock',
    method: 'post',
    data:data,
  })
}



//保存自定义字段
export function saveField(data) {
  return request({
    url: '/field/bizCrmField/saveField',
    method: 'post',
    data:data,
  })
}
//查询场景列表
export function queryScene(type) {
  return request({
    url: '/field/bizCrmScene/queryScene?type='+type,
    method: 'post',
  })
}
//查询场景搜索字段
export function queryField(label) {
  return request({
    url: 'field/bizCrmScene/queryField?label='+label,
    method: 'post',
  })
}
//新增场景
export function addScene(data) {
  return request({
    url: '/field/bizCrmScene/addScene',
    method: 'post',
    data:data,
  })
}
//编辑场景
export function updateScene(data) {
  return request({
    url: '/field/bizCrmScene/updateScene',
    method: 'post',
    data:data,
  })
}

//设置场景
export function sceneConfig(data) {
  return request({
    url: '/field/bizCrmScene/sceneConfig',
    method: 'post',
    data:data,
  })
}
//设置场景
export function querySceneConfig(type) {
  return request({
    url: '/field/bizCrmScene/querySceneConfig?type='+type,
    method: 'post',
  })
}
//删除场景
export function deleteScene(id) {
  return request({
    url: '/field/bizCrmScene/deleteScene?sceneId='+id,
    method: 'post',
  })
}
//设置默认场景
export function setDefaultScene(id) {
  return request({
    url: '/field/bizCrmScene/setDefaultScene?sceneId='+id,
    method: 'post',
  })
}
//查询详情页信息
export function information(customerId,data) {
  return request({
    url: '/crm/bizCrmCustomer/information/'+customerId,
    method: 'post',
  })
}
//基本信息保存修改
export function updateInformation(data) {
  return request({
    url: '/crm/bizCrmCustomer/updateInformation',
    method: 'post',
    data:data,
  })
}
//获取自定义字段列表
export function queryFields() {
  return request({
    url: '/field/bizCrmField/queryFields',
    method: 'get',
  })
}
